#ifndef QUPDATEMANAGER_H
#define QUPDATEMANAGER_H

#include "update_global.h"

#include <QObject>

class QGetVersion;
class QGetFile;

class UPDATESHARED_EXPORT QUpdateManager : public QObject
{
    Q_OBJECT
public:
    explicit QUpdateManager(QObject *parent = 0);
    ~QUpdateManager();

    void    test_version();
    void    start_update(const QString &path);
    QByteArray  get_version_data();
signals:
    void    version_finish();
    void    file_finish();
    void    progress(qint64 count,qint64 total);
    void    offline();
public slots:
    void    version(const QByteArray& data);
protected:
    QGetVersion     *m_version;
    QGetFile        *m_file;
    QByteArray      m_version_data;
};

#endif // QUPDATEMANAGER_H
